<div id="central" class="warp">
  {include file="index/menu"}
  <div id="main" class="friends">
    <div id="header">
      <div class="title">
        <h1>我的联系人</h1>
      </div>
      <div class="return"><a href="{$url(index/index)}">中心首页</a></div>
      <div class="fn-clear"></div>
    </div>
      	<?php if(empty($list)){ echo '<div class="tools">暂时没有添加联系人</div>';} ?>
    <div class="friends-list">
      <ul>
      	<!--foreach:{$list $vo}-->
        <li>
        <div class="user-menu">
        <div><a href="<?php echo url('index/home',array(uid=>$vo['uid'])) ?>" target="_blank"><?php if($vo['remark']){ echo $vo['remark']; }else{ echo $vo['nicename']; }  ?> [{$vo.username}]</a></div>
        <div><a href="<?php echo url('message/add',array('user'=>$vo['username'])) ?>" target="_blank" class="button_small">发送信息</a> <a class="button_small" href="javascript:;" onclick="del({$vo.uid},this)">解除联系人</a> <a class="button_small" href="<?php echo url('friends/edit',array('fid'=>$vo['fid'])) ?>">修改备注</a>  </div>
        </div>
        <div class="fn-clear"></div>
        </li>
        <!--{/foreach}-->
      </ul>
    </div>
    <div class="fn-clear"></div>
  </div>
  <div class="pages">{$page}</div>
  <div class="fn-clear"></div>
</div>
<script>
var del = new function(){}; 
Do.ready('userbase','form','dialog', function() {
	window.del=function del(fid,obj) {
		var obj;
		ajaxpost({
			name:'确认要解除本联系人的关系吗？',
			url:"{$url(friends/del)}",
			data:{fid: fid},
			tip:1,
			success:function(){
				$(obj).parent().parent().parent().remove();
			}
		});
	}
});
</script> 
<script>

</script>